package Routeviews::Archive;
use base 'Routeviews::DBI';

use strict;
use warnings;

__PACKAGE__->columns(All => qw/id type asn sha1 created data/);
__PACKAGE__->set_table('archive');

sub create_sql {
    return q{
        id bigserial primary key,
        type text,
        asn real not null,
        sha1 varchar(40),
        created timestamp with time zone default now(),
        data text not null,
        unique(sha1)
    }
}

1;
__END__
# Below is stub documentation for your module. You'd better edit it!

=head1 NAME

Routeviews::Archive - Perl extension for archiving Routeviews data

=head1 SYNOPSIS

see script/rv_parse.pl

=head1 DESCRIPTION

This module interacts with the main 'archive' table. Any post processing of data as it's parsed (with rv_parse.pl) should be hooked in with Class::DBI's '&after_create' function. This module will auto-create the table if it doesn't already exist (assuming your user in Routeviews::DBI->connection() has the proper rights). See &create_sql for a list of fields.
